package com.gaohe.help.service.impl;

import java.util.List;
import com.gaohe.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.help.mapper.FmHelpMapper;
import com.gaohe.help.domain.FmHelp;
import com.gaohe.help.service.IFmHelpService;

/**
 * 互助订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-03
 */
@Service
public class FmHelpServiceImpl implements IFmHelpService 
{
    @Autowired
    private FmHelpMapper fmHelpMapper;

    /**
     * 查询互助订单
     * 
     * @param helpId 互助订单主键
     * @return 互助订单
     */
    @Override
    public FmHelp selectFmHelpByHelpId(Long helpId)
    {
        return fmHelpMapper.selectFmHelpByHelpId(helpId);
    }

    /**
     * 查询互助订单列表
     * 
     * @param fmHelp 互助订单
     * @return 互助订单
     */
    @Override
    public List<FmHelp> selectFmHelpList(FmHelp fmHelp)
    {
        return fmHelpMapper.selectFmHelpList(fmHelp);
    }

    /**
     * 新增互助订单
     * 
     * @param fmHelp 互助订单
     * @return 结果
     */
    @Override
    public int insertFmHelp(FmHelp fmHelp)
    {
        fmHelp.setCreateTime(DateUtils.getNowDate());
        return fmHelpMapper.insertFmHelp(fmHelp);
    }

    /**
     * 修改互助订单
     * 
     * @param fmHelp 互助订单
     * @return 结果
     */
    @Override
    public int updateFmHelp(FmHelp fmHelp)
    {
        fmHelp.setUpdateTime(DateUtils.getNowDate());
        return fmHelpMapper.updateFmHelp(fmHelp);
    }

    /**
     * 批量删除互助订单
     * 
     * @param helpIds 需要删除的互助订单主键
     * @return 结果
     */
    @Override
    public int deleteFmHelpByHelpIds(Long[] helpIds)
    {
        return fmHelpMapper.deleteFmHelpByHelpIds(helpIds);
    }

    /**
     * 删除互助订单信息
     * 
     * @param helpId 互助订单主键
     * @return 结果
     */
    @Override
    public int deleteFmHelpByHelpId(Long helpId)
    {
        return fmHelpMapper.deleteFmHelpByHelpId(helpId);
    }
}
